import request from "@/util/request";

const baseUrl = 'cart/'

export function addCartApi(skuId, num) {
    return request({
        url: baseUrl + 'add',
        method: 'post',
        params :{
            skuId,
            num
        }
    })
}
export function listCartApi() {
    return request({
        url: baseUrl + 'get/list',
        method: 'get',
    })
}

/**
 * 批量删除购物车记录
 * @param data
 * @returns {*}
 */
export function delCartsApi(data) {
    return request({
        url: baseUrl + 'del/list',
        method: 'delete',
        data
    })
}
